package com.yun.many.auth.dao.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yun.many.auth.dao.entity.Resource;
import com.yun.many.auth.dao.mapper.ResourceMapper;
import com.yun.many.auth.dao.service.IResourceRepository;
import com.yun.many.auth.model.req.MenuQueryReq;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.awt.*;

@Slf4j
@Service
@RequiredArgsConstructor
public class ResourceRepository extends ServiceImpl<ResourceMapper, Resource> implements IResourceRepository {
    private final ResourceMapper resourceMapper;

    @Override
    public Page<Resource> pageMenu(MenuQueryReq req) {
        return new LambdaQueryChainWrapper<>(resourceMapper)
                .page(req);
    }
}
